{include file="public/header"}
<!-- 表单 -->
<style>
    .layui-form-label {
        width: 100px;
    }

    .layui-input-block {
        margin-left: 130px;
    }

    .layui-form-item {
        margin-right: 30%;
    }
</style>
</head>

<body>
    <div class="cBody">
        <form id="addForm" class="layui-form" action="">
            <div class="layui-form-item">
                <label class="layui-form-label">角色名称</label>
                <div class="layui-input-block">
                    <input type="text" name="name" autocomplete="off" class="layui-input" value="{$find.name}">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">描述</label>
                <div class="layui-input-block">
                    <input type="text" name="desc" autocomplete="off" class="layui-input" value="{$find.desc}">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="submitBut">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>

        <script>
            //表单提交
            layui.use(['form', 'layer'], function () {
                var form = layui.form;
                var layer = layui.layer;
                form.render();
                //监听提交
                form.on('submit(submitBut)', function (data) {
                    ajax_submit(data.field, '', 'demo');
                    return false;
                });
            });
        </script>
    </div>
</body>
{include file="public/footer"}